package com.qidian.mes.tm.controller;

import com.qidian.mes.pojo.TmToolType;
import com.qidian.mes.tm.service.TmToolTypeService;
import com.qidian.mes.util.pojo.MESResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author zhangYu
 * @Company 起点编程
 * @Time 2023/11/6 10:23
 * @Description
 */
@RestController
@CrossOrigin
@RequestMapping("/tmToolType")
public class TmToolTypeController {
    @Autowired
    TmToolTypeService tmToolTypeService;

    @GetMapping("/get")
    public MESResult get(Long memberId){
        return tmToolTypeService.get(memberId);
    }
    @GetMapping("/list")
    public MESResult list(@RequestParam(defaultValue = "1")int page, @RequestParam(defaultValue = "10") int limit,TmToolType tmToolType){
        return tmToolTypeService.list(page,limit,tmToolType);
    }
    @PostMapping("/save")
    public MESResult save(TmToolType tmToolType){
        return tmToolTypeService.save(tmToolType);
    }

}
